package com.platform.hjt.from.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.platform.hjt.erp.model.ErpGoodInfo;

/**
 * FromQjOrderDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "from_qj_order_detail", catalog = "erp_platform")
public class FromQjOrderDetail implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1440908931493278818L;
	private String qjOrderDetailId;
	private ErpGoodInfo erpGoodInfo;
	private FromQjOrder fromQjOrder;
	private String color;
	private Double price;
	private Double count;
	
	private Boolean isAllow;
	private Boolean isProduce;
	
	private Boolean isIn;
	private Boolean isOut;
	
	
	private String colorCode;
	
	private Double scPrice;

	// Constructors

	/** default constructor */
	public FromQjOrderDetail() {
	}

	/** minimal constructor */
	public FromQjOrderDetail(String qjOrderDetailId, ErpGoodInfo erpGoodInfo,
			FromQjOrder fromQjOrder) {
		this.qjOrderDetailId = qjOrderDetailId;
		this.erpGoodInfo = erpGoodInfo;
		this.fromQjOrder = fromQjOrder;
	}

	/** full constructor */
	public FromQjOrderDetail(String qjOrderDetailId, ErpGoodInfo erpGoodInfo,
			FromQjOrder fromQjOrder, String color, Double price, Double count) {
		this.qjOrderDetailId = qjOrderDetailId;
		this.erpGoodInfo = erpGoodInfo;
		this.fromQjOrder = fromQjOrder;
		this.color = color;
		this.price = price;
		this.count = count;
	}

	// Property accessors
	@Id
	@GenericGenerator(name="systemUUID",strategy="uuid")
	@GeneratedValue(generator="systemUUID")
	@Column(name = "qj_order_detail_id", unique = true, nullable = false, length = 32)
	public String getQjOrderDetailId() {
		return this.qjOrderDetailId;
	}

	public void setQjOrderDetailId(String qjOrderDetailId) {
		this.qjOrderDetailId = qjOrderDetailId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "erp_good_info_id", nullable = false)
	public ErpGoodInfo getErpGoodInfo() {
		return this.erpGoodInfo;
	}

	public void setErpGoodInfo(ErpGoodInfo erpGoodInfo) {
		this.erpGoodInfo = erpGoodInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "qj_order_id", nullable = false)
	public FromQjOrder getFromQjOrder() {
		return this.fromQjOrder;
	}

	public void setFromQjOrder(FromQjOrder fromQjOrder) {
		this.fromQjOrder = fromQjOrder;
	}

	@Column(name = "color", length = 200)
	public String getColor() {
		return this.color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	@Column(name = "price", precision = 22, scale = 0)
	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	@Column(name = "count", precision = 22, scale = 0)
	public Double getCount() {
		return this.count;
	}

	public void setCount(Double count) {
		this.count = count;
	}

	@Column(name = "is_allow")
	public Boolean getIsAllow() {
		return isAllow;
	}

	public void setIsAllow(Boolean isAllow) {
		this.isAllow = isAllow;
	}

	@Column(name = "color_code")
	public String getColorCode() {
		return colorCode;
	}

	public void setColorCode(String colorCode) {
		this.colorCode = colorCode;
	}
	
	@Column(name = "sc_price")
	public Double getScPrice() {
		return scPrice;
	}

	public void setScPrice(Double scPrice) {
		this.scPrice = scPrice;
	}

	@Column(name = "is_produce")
	public Boolean getIsProduce() {
		return isProduce;
	}

	public void setIsProduce(Boolean isProduce) {
		this.isProduce = isProduce;
	}

	@Column(name = "is_in")
	public Boolean getIsIn() {
		return isIn;
	}

	public void setIsIn(Boolean isIn) {
		this.isIn = isIn;
	}

	@Column(name = "is_out")
	public Boolean getIsOut() {
		return isOut;
	}

	public void setIsOut(Boolean isOut) {
		this.isOut = isOut;
	}

}